﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Stamp_For_Africa_Version_2.Models;
using Stamp_For_Africa_Version_2.Repositories;

namespace Stamp_For_Africa_Version_2.ViewModels
{
	public class StampDetailsViewModel
	{
		public Stamp Stamp { get; set; }
		public List<Comment> StampComments { get; set; }
    public List<CatalogueEntry> CatalogueEntries { get; set; } 
	  public Guid GetLinkedMinaitureSheet
	  {
	    get
	    {
	      StampRepository stampRepository = new StampRepository();
	      return stampRepository.GetLinkedStamp(Stamp.Id, LinkType.MinaitureSheet);
	    }
	  }
    public String GetStampTypeDescription( Guid id )
    {
      TypeRepository typeRepository = new TypeRepository();
      return typeRepository.GetStampType(id).Description;
    }

		public List<Stamp> GetStampVariations
		{
			get
			{
				StampRepository stampRepository = new StampRepository();
				return stampRepository.GetLinkedStamps(Stamp.Id, LinkType.Variation);
			}
		}
    
	}
}